package com.fmy.jurisdiction.core.unusual;

import com.fmy.jurisdiction.core.web.specs.IEnum;
import com.fmy.jurisdiction.core.web.specs.ResponseEnum;
import lombok.Getter;

/**
 * @author Mr.fmy
 * @version 1.0.0
 * @ClassName BizExceptional
 * @Description TODO 自定义业务异常
 * @createTime 2019/9/16 13:52
 */
public class BizException extends RuntimeException {
    @Getter
    private IEnum iEnum;

    public BizException(IEnum iEnum, String message) {
        super(message);
        this.iEnum = iEnum;
    }

    public BizException(String message) {
        super(message);
        this.iEnum = ResponseEnum.BUSINESS_FAIL;
    }
}
